<?php
// category.ob.php - category as class / object

class Category {
	function __construct(){
		// Does nothing but initializing object
	}
	function show_menu(){
		$query = "SELECT * FROM category ORDER BY name";
		$res = mysql_query($query);
		$html = "\n\r". '<ul>';
		while ($record = mysql_fetch_array($res)){
			$html .= "\n\r".'<li><a href="?category='. $record['id'] .'">'. $record['name'] .'</a></li>';
		}
		$html .= '</ul>'."\n\r";
		return $html;
	}
}

?>